import java.util.Scanner;

public class Computer {
    public static void main(String[] args) {
        System.out.println("*********************************\n" +
                "*****微型计算器              ****\n" +
                "*****1、求和                 ****\n" +
                "*****2、求差                 ****\n" +
                "*****3、求积                 ****\n" +
                "*****4、求商                 ****\n" +
                "*****5、求余                 ****\n" +
                "*****Q、退出                 ****\n" +
                "*****请选择您想执行的操作    ****\n" +
                "*********************************");
        Scanner input = new Scanner(System.in);
        System.out.println("请输入数字以选择计算机模式：");
        int a= input.nextInt();
        System.out.println("请输入两个用于计算的数字：");
        int b=input.nextInt();
        int c= input.nextInt();
        switch (a) {
            case 1:
                System.out.println("结果为"+(b+c));
                break;
            case 2:
                System.out.println("结果为"+(b-c));
                break;
            case 3:
                System.out.println("结果为"+(b*c));
                break;
            case 4:
                System.out.println("结果为"+(b/c));
                break;
            case 5:
                System.out.println("结果为"+(b%c));
                break;
            case 'Q':
                System.out.println("结果为"+(b-c));
                break;
            default:
                System.out.println("操作错误");
        }
    }
}
